|
|
|
|
|
|
|
(table continued from previous page) |
|
|
|
|
| Control | Name | Caption | Style | | Command6 | cmdIcon | Load Icon into | Graphical | | | Command button | | | Picture1 | picBitmap | N/A | N/A | | Label1 | lblString | (blank) | N/A |
|
|
|
|
|
|
Now add the resource file to the project. Right-click in the Project window, select the Add option, and then select Add Resource File to display the Open a Resource File dialog box. Locate the resource file that you just created and select it. It's now displayed in the project window in the group Related Documents (see Figure 19.8). |
|
|
|
|
|
|
|
|
Figure 19.8.
Confirming that the resource
file has been added correctly
to the project. |
|
|
|
|
|
|
|
|
You can use three commands to retrieve specific resources from the file. The syntax of each command is discussed in the following sections. |
|
|
|
|
|
|
|
|
Lblprompt.caption = LoadResString(index) |
|
|
|
|
|
|
|
|
The required index parameter can be an integer value or a string that specifies the identifier (ID) of the data in the resource file. |
|
|
|
|
|
|
|
|
PicFrame.Picture = LoadResPicture(index, format) |
|
|
|
|
|
|
|
|
The required index parameter can be an integer value or a string that specifies the identifier (ID) of the data in the resource file. |
|
|
|
|
|
|
|
|
The format parameter is also required. The value or constant specifies the format of the data being returned, as follows: |
|
|
|
|
|